import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */
export function useBussApi(){
	return {
		queryPlatList: (data: object) => {
			return request({
				url: 'plat/index',
				method: 'post',
				data,
			});
		},
		editPlat: (data: object) => {
			return request({
				url: 'plat/info',
				method: 'post',
				data,
			});
		},
		updatePlat: (data: object) => {
			return request({
				url: 'plat/status',
				method: 'post',
				data,
			});
		},
		queryUserList: (data: object) => {
			return request({
				url: 'user/index',
				method: 'post',
				data,
			});
		},
		queryUserTypeList: (data: object) => {
			return request({
				url: 'common/user/type',
				method: 'get'
			});
		},
		editUser: (data: object) => {
			return request({
				url: 'user',
				method: 'post',
				data,
			});
		},
		deleteUser: (data: String) => {
			return request({
				url: 'user/'+data,
				method: 'delete',
				data,
			});
		},
	}
}
